import datastore
import os

def spider(path):
	# Test if this path is already covered
	for path, dirs, files in os.walk(os.path.abspath(path)):
		for dir in dirs:
			updateOrAddDirectory(os.path.join(path,dir))
#		atime,mtime = utime(os.path.join(path,i))

def dirToId(path):
	pass

def updateOrAddDirectory(path):
	print path


if __name__ == '__main__':
	import sys
	if len(sys.argv) != 2:
		print "Usage spider.py <dir>"
	else:
		spider(sys.argv[1])
